﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="RuneMasterWin8.Pages.MainPage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:RuneMasterWin8.Pages"
    xmlns:common="using:RuneMasterWin8.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>

        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">My Application</x:String>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Viewbox>
		<VisualStateManager.VisualStateGroups>
<!-- Visual states reflect the application's view state -->
			<VisualStateGroup x:Name="ApplicationViewStates">
				<VisualState x:Name="FullScreenLandscape"/>
				<VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
				<VisualState x:Name="FullScreenPortrait">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
							<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>

                <!-- The back button and title have different styles when snapped -->
				<VisualState x:Name="Snapped">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
							<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
							<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Grid Style="{StaticResource LayoutRootStyle}" Height="768" Width="1366">
			<Grid.RowDefinitions>
				<RowDefinition Height="140"/>
				<RowDefinition Height="*"/>
			</Grid.RowDefinitions>

			<!-- Back button and page title -->
			<Image Source="ms-appx:///Images/background.png" Stretch="Fill" Grid.RowSpan="2" d:IsLocked="True"/>

			<!-- Back button and page title -->
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<Button Visibility="Collapsed" x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
				<TextBlock Visibility="Collapsed" x:Name="pageTitle" Grid.Column="1" Text="{StaticResource AppName}" Style="{StaticResource PageHeaderTextStyle}"/>
				<Image Grid.ColumnSpan="2" Margin="304,44,774,20" Source="ms-appx:///Images/mainTitle2.png" Stretch="Fill" Width="288" Height="76"/>
			</Grid>
			<Border x:Name="bdrLoding" BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="768" Grid.RowSpan="2" VerticalAlignment="Top" Width="1366" Background="#7F000000" d:IsHidden="True" d:IsLocked="True">
				<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
					<ProgressRing HorizontalAlignment="Center" VerticalAlignment="Center" BorderBrush="Red" IsActive="True" Width="77" Height="77"/>
					<TextBlock HorizontalAlignment="Center" Margin="0" TextWrapping="Wrap" Text="拼命加载中..." VerticalAlignment="Center" Foreground="White" FontSize="21.333"/>
				</StackPanel>
			</Border>
			<Image Margin="10,562,0,-2" Source="ms-appx:///Images/runes.png" Stretch="Fill" Width="300" Height="68" HorizontalAlignment="Left" Grid.Row="1"/>
			<Image Margin="1197,573,10,10" Grid.Row="1" Source="ms-appx:///Images/logo77.png" Stretch="Fill"/>
			<Grid Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
				<Button x:Name="btnContinue" HorizontalAlignment="Left" Height="200" VerticalAlignment="Top" Width="200" Click="btnContinue_Click" FontFamily="Microsoft YaHei" FontSize="29.333" Margin="204,0,0,0" Background="#FF0376A6">
					<Grid>
						<Image Source="ms-appx:///Images/Button/arrow-left-2.png" Stretch="None"/>
						<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="继续游戏" VerticalAlignment="Bottom" Margin="0,0,-18,-26" FontSize="21.333"/>
					</Grid>
				</Button>
				<Button x:Name="btnNewGame" HorizontalAlignment="Left" Height="200" VerticalAlignment="Top" Width="200" Click="btnNewGame_Click" FontFamily="Microsoft YaHei" FontSize="29.333" Background="#FF0376A6">
					<Grid>
						<Image Source="ms-appx:///Images/Button/add-2.png" Stretch="None"/>
						<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="新游戏" VerticalAlignment="Bottom" Margin="0,0,-18,-26" FontSize="21.333"/>
					</Grid>
				</Button>
				<Button x:Name="btnMyScore" HorizontalAlignment="Left" Height="200" VerticalAlignment="Top" Width="200" Click="btnMyScore_Click" FontFamily="Microsoft YaHei" FontSize="29.333" Margin="0,205,0,0" Background="#FF0376A6">
					<Grid>
						<Image Source="ms-appx:///Images/Button/badge.png" Stretch="None"/>
						<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="游戏纪录" VerticalAlignment="Bottom" Margin="0,0,-18,-26" FontSize="21.333"/>
					</Grid>
				</Button>
				<Button x:Name="btnNewUser" HorizontalAlignment="Left" Height="200" VerticalAlignment="Top" Width="200" FontFamily="Microsoft YaHei" FontSize="29.333" Margin="204,205,0,0" Background="#FF0376A6" Click="btnNewUser_Click">
					<Grid>
						<Image Source="ms-appx:///Images/Button/gift-box.png" Stretch="None"/>
						<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="新手礼包" VerticalAlignment="Bottom" Margin="0,0,-18,-26" FontSize="21.333"/>
					</Grid>
				</Button>
				<Button Click="btnSoundOn_Click" x:Name="btnSoundOn" HorizontalAlignment="Left" Height="200" VerticalAlignment="Top" Width="200" FontFamily="Microsoft YaHei" FontSize="29.333" Margin="408,205,-3,0" Background="#FF0376A6">
					<Grid>
						<Image Source="ms-appx:///Images/Button/volume.png" Stretch="None"/>
						<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="音效开" VerticalAlignment="Bottom" Margin="0,0,-18,-26" FontSize="21.333"/>
					</Grid>
				</Button>
				<Button Click="btnSoundOff_Click" x:Name="btnSoundOff" HorizontalAlignment="Left" Height="200" VerticalAlignment="Top" Width="200" FontFamily="Microsoft YaHei" FontSize="29.333" Margin="408,205,-3,0" Background="#FF0376A6" Visibility="Collapsed">
					<Grid>
						<Image Source="ms-appx:///Images/Button/volume-mute.png" Stretch="None"/>
						<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="音效关" VerticalAlignment="Bottom" Margin="0,0,-18,-26" FontSize="21.333"/>
					</Grid>
				</Button>

			</Grid>
			<Image Source="ms-appx:///Images/mainTitle1.png" Stretch="Fill" Grid.RowSpan="2" Width="771" Height="118" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="298,106,297,0"/>

		</Grid>
	</Viewbox>
</common:LayoutAwarePage>
